package com.yitao.cms.vo.order;

import com.yitao.cms.utils.NumberUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class CmsMallOrderDetailVo {

    private Long id;
    /**
     * 关联的订单id号
     */
    @ApiModelProperty("关联的订单id号")
    private Long orderId;


    /**
     * 下单的商品id号
     */
    @ApiModelProperty("下单的商品id号")
    private Long productId;


    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品编号")
    private String productCode;
    /**
     * 下单的商品id号
     */
    @ApiModelProperty("下单的商品skuId号")
    private Long productSkuId;


    @ApiModelProperty("下单的商品规格名称")
    private String productSkuName;
    /**
     * 商品售价
     */
    @ApiModelProperty("商品售价 单位为分")
    private Long productSalesPrice;
    @ApiModelProperty("商品售价 单位为元")
    private Double productSalesPriceYuan;

    /**
     * 商品图片地址
     */
    @ApiModelProperty("商品图片地址")
    private String productImgUrl;

    /**
     * 下单的数量
     */
    @ApiModelProperty("下单的数量")
    private Integer quantity;


    /**
     * 店铺id
     */
    @ApiModelProperty("店铺id")
    private Long shopId;


    /**
     * 店铺id
     */
    @ApiModelProperty("店铺id")
    private String shopName;


    /**
     * 平摊价
     */
    @ApiModelProperty("平摊价 单位为分")
    private Long sharePrice;

    @ApiModelProperty("平摊价 单位为元")
    private Double sharePriceYuan;

    /**
     * 基础价
     */
    @ApiModelProperty("基础价 单位为分")
    private Long basePrice;
    @ApiModelProperty("基础价 单位为元")
    private Double basePriceYuan;

    /**
     * 原始价格
     */
    @ApiModelProperty("原始价格 单位为分")
    private Long originalPrice;
    @ApiModelProperty("原始价格 单位为元")
    private Double originalPriceYuan;


    /**
     * 优惠金额(优惠券，微商推广折扣)
     */
    @ApiModelProperty("优惠金额(优惠券，微商推广折扣) 单位为分")
    private Long favorableFee2;

    @ApiModelProperty("优惠金额 单位为元")
    private Double favorableFee2Yuan;

    @ApiModelProperty("缺货标记")
    private String outQuantity;

    @ApiModelProperty("商品状态")
    private String orderStatus;

    @ApiModelProperty("运费 分")
    private Long freightFee;

    @ApiModelProperty("运费 元")
    private Double freightFeeYuan;

    @ApiModelProperty("是否可以点击发货 0 否 1 是 ")
    private Integer isDeliver;

    @ApiModelProperty("是否可以标记缺 0 否 1 是 ")
    private Integer isTheLackOf;

    public Double getFreightFeeYuan() {
        return freightFeeYuan = NumberUtil.centToYuanForDouble(freightFee);
    }

    public Double getProductSalesPriceYuan() {
        return productSalesPriceYuan = NumberUtil.centToYuanForDouble(productSalesPrice);
    }


    public Double getBasePriceYuan() {
        return basePriceYuan = NumberUtil.centToYuanForDouble(basePrice);
    }


    public Double getOriginalPriceYuan() {
        return originalPriceYuan = NumberUtil.centToYuanForDouble(originalPrice);
    }

    public Double getFavorableFee2Yuan() {
        return favorableFee2Yuan = NumberUtil.centToYuanForDouble(favorableFee2);
    }

    public Double getSharePriceYuan() {
        return sharePriceYuan = NumberUtil.centToYuanForDouble(sharePrice);
    }
}
